Merge "Normalize `input[type="search"]`"
[lhc/web/wiklou.git] / maintenance / rebuildLocalisationCache.php
index 68b6ea3..82b362b 100644 (file)
@@ -29,6 +29,8 @@
  * @ingroup Maintenance
  */
 
+use MediaWiki\MediaWikiServices;
+
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -111,9 +113,9 @@ class RebuildLocalisationCache extends Maintenance {
                        $pid = ( $threads > 1 ) ? pcntl_fork() : -1;
 
                        if ( $pid === 0 ) {
-                               // Child, reseed because there is no bug in PHP:
-                               // http://bugs.php.net/bug.php?id=42465
-                               mt_srand( getmypid() );
+                               // Reset services, so we don't re-use connections.
+                               MediaWikiServices::resetChildProcessServices();
+
                                $this->doRebuild( $codes, $lc, $force );
                                exit( 0 );
                        } elseif ( $pid === -1 ) {